package crypto

import (
	"encoding/base64"
	"fmt"
)

// BASE64StdEncode base编码
func BASE64StdEncode(src string) string {
	return base64.StdEncoding.EncodeToString([]byte(src))
}

// BASE64StdDecode base解码
func BASE64StdDecode(src string) string {
	a, err := base64.StdEncoding.DecodeString(src)
	if err != nil {
		_ = fmt.Errorf("解密失败,%v\n", err)
	}
	return string(a)
}
